public class test {
    public static void main(String[] args) {
        Students stu4 = new Students(); //类只加载一次
        System.out.println(stu4.age);
    }
    public static void main3(String[] args) {
        Students stu3 = new Students();
        //stu3.func();
        Students.teststatic();
    }
    public static void main2(String[] args) {
        Testdemo testdemo1 = new Testdemo();
        testdemo1.count++;
        Testdemo testdemo2 = new Testdemo();
        testdemo2.count++;  //既可以通过对象的引用来进行访问成员变量
        Testdemo.count--;
        Testdemo.count++;
        Testdemo.count--; //也可以通过类名进行访问，更推荐类名访问
        System.out.println(Testdemo.count);
    }
    public static void main1(String[] args) {
        Students stu = new Students();
        stu.classroom = "java118";
        stu.name = "zhangsan";
        Students stu1 = new Students();
        stu1.classroom = "java118";
        stu1.name = "lisi";

    }
}

